inspector: Init yourself
authorMatthias Clasen <mclasen@redhat.com>
Sat, 7 Dec 2019 15:00:41 +0000 (10:00 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 7 Dec 2019 19:59:49 +0000 (14:59 -0500)
No need to have GTK call this from the outside.

gtk/gtkwindow.c
gtk/inspector/window.c

index 6a58f55a02f0608db3432e4b9e0005e2407c6d3d..6a0771dcd69222b507d899a8f4cbf7cd85756cae 100644 (file)
@@ -75,7 +75,6 @@
 
 #include "a11y/gtkwindowaccessibleprivate.h"
 #include "a11y/gtkcontaineraccessibleprivate.h"
-#include "inspector/init.h"
 #include "inspector/window.h"
 
 #include "gdk/gdktextureprivate.h"
@@ -9039,7 +9038,6 @@ gtk_window_set_debugging (gboolean enable,
 
   if (inspector_window == NULL)
     {
-      gtk_inspector_init ();
       inspector_window = gtk_inspector_window_new ();
       gtk_window_set_hide_on_close (GTK_WINDOW (inspector_window), TRUE);
 
index 71aeec9f69c7cea52a70c976ab8a297beb1a9ee0..3b6afee60fc04cd560eb685c9c04c352c4ad838f 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <stdlib.h>
 
+#include "init.h"
 #include "window.h"
 #include "prop-list.h"
 #include "controllers.h"
@@ -418,6 +419,8 @@ get_inspector_display (void)
 GtkWidget *
 gtk_inspector_window_new (void)
 {
+  gtk_inspector_init ();
+
   return GTK_WIDGET (g_object_new (GTK_TYPE_INSPECTOR_WINDOW,
                                    "display", get_inspector_display (),
                                    NULL));